﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rel.Expressions
{
   public class Extract:RegBase
    {
       public string ExtractName { get; set; }
      

       public Extract(string extractName,  RelGroup internalPattern, RelGroup parent):base(parent)
       {
           ExtractName = extractName;
           AddChildExpression(internalPattern);
           UseExtract = true;
       }


       public override string Pattern
       {
           get
           {
               return "(?<" + GroupName + ">(" + ChildExpressions.First().Pattern + "))";
           }           
       }

    }
}
